package com.ibangnuo.manage.controller.user;

import com.ibangnuo.api.user.UserControllerApi;
import com.ibangnuo.framework.model.response.ResponseResult;
import com.ibangnuo.manage.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: wwy
 * @Date: 2020-01-14 18:10
 */
@RestController
@RequestMapping("/user")
public class UserController implements UserControllerApi {
    @Autowired
    private UserService userService;
    @GetMapping("/findByUsername/{username}")
    @Override
    public ResponseResult findByUsername(@PathVariable("username") String username) {
        return userService.findByNewUsername(username);
    }
}
